package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;

@Setter
@Getter
public class SystemDictionaryItem {
    /** 主键*/
    private Long id;

    /** 标题*/
    private String title;

    /** 序号*/
    private Integer sequence;

    /** 所属目录*/
    private SystemDictionary type;

    /** 上级明细*/
    private SystemDictionaryItem parent;

    public String getJson(){
        HashMap<String,Object> map = new HashMap();
        map.put("id",id);
        map.put("title",title);
        map.put("sequence",sequence);
        map.put("type",type);
        map.put("parent",parent);
        return JSON.toJSONString(map);
    }
}